<?php

class artModel extends Model {

    private $table = '`sd_art`';

    public function addart($data) {        
        return $this->_insert($this->table, $data);
    }
    
    public function updateart($data,$id){
        $where = "WHERE art_id = " . $id;
        Return $this->_update($this->table, $data, $where);
    }
    public function delart($id){
        return $this->_query("DELETE FROM" . $this->table . " WHERE art_id = " . $id);
    }
    public function getallart(){
        return $this->_all('SELECT * FROM `sd_art`');
    }
    public function getoneart($id){
        return $this->_row("SELECT * FROM `sd_art` where art_id = {$id}");
    }
    
    public function getallart1($id){
        return $this->_all("SELECT * FROM `sd_art` where artc = {$id}");
    }

}
